import React, {Component} from 'react';
import {observer} from 'mobx-react';


@observer
class TimerView extends Component {

    onReset = () => {
        this.props.appState.resetTimer();
        console.log(this.props.appState);
    };

    render() {
        let {timer} = this.props.appState;
        return (
            <button onClick={this.onReset.bind(this)}>
                Seconds passed: {timer}
            </button>
        );
    }
}

export default TimerView